import {
	saveRepairOrder,
	saveCompetitive,
	saveNewProduct
} from '../../api/feedback.js'

export default {
	state: {},
	mutations: {},
	getters: {

	},
	actions: {
		saveRepairOrder({}, payload) {
			return new Promise((resolve, reject) => {
				saveRepairOrder(payload).then(res => {
					resolve(res)
				}).catch(err => {
					reject(err)
				})
			})
		},
		saveCompetitive({}, payload) {
			return new Promise((resolve, reject) => {
				saveCompetitive(payload).then(res => {
					resolve(res)
				}).catch(err => {
					reject(err)
				})
			})
		},
		saveNewProduct({}, payload) {
			return new Promise((resolve, reject) => {
				saveNewProduct(payload).then(res => {
					resolve(res)
				}).catch(err => {
					reject(err)
				})
			})
		},
	},
	namespaced: true
}
